#ifndef VERTEX_H
#define VERTEX_H

#include "gisgraph_global.h"

#include <QGraphicsItem>

class Graph;
class GISGRAPHSHARED_EXPORT Vertex : public QGraphicsItem
{
public:
	Vertex(Graph *parent = 0);
	Vertex(Graph *parent, const QString &name = QString());
	void setParentGraph(Graph *g);
	Graph *parentGraph() const;
	QRectF boundingRect() const;
	int type() const { return GisGraph::VertexType; }
	void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
	QPainterPath shape() const;
	QList<Vertex *> neighbours() const;
	QString name() const;
	void setName(const QString &name);
private:
	Graph *m_parent;
	QString m_name;
};

#endif // VERTEX_H
